package ch06_抽象类接口与嵌套类;
interface ChargeService{
	void charge();
}
class PowerSocket{
	void get220vAC() {
		System.out.println("得到220v交流电……");
	}
}
class PowerAdapter extends PowerSocket implements ChargeService{
	public void charge() {
		get220vAC();
		System.out.println("转换为5v交流电……");
		System.out.println("充电中……");
	}
}
public class IPhoneX {
	public static void main(String[] args) {
		ChargeService cs =new PowerAdapter();
		cs.charge();
	}
}
